<tagLib name="mkrtags" />
<!--  功能操作区域  -->

<table width="100%" cellpadding="0" cellspacing="0" >
  <tr>
    <td width="60%">
	    <span><input type="button"  onclick="add()" class="button1" title="增加数据" value="增加数据" /> </span>
	    <span><input type="button"  onclick="edit()" class="button1" title="编辑数据" value="编辑数据" /> </span>
	    <span><input type="button"  onclick="view()" class="button1" title="查看详细数据" value="查看详细" /> </span>
	    <span><input type="button"  onclick="del()" class="button1" title="删除数据" value="删除数据" /> </span>
	    
		    <span>
			    <input type="button"  onclick="display('searchbox')" class="button1" title="搜索数据" value="搜索数据▼" />
			    <div class="searchbox" id="searchbox" style="display:none">
			        <table cellpadding="0" cellspacing="0">
			          <tr>
			            <td class="ewTableHeader">关键词:</td>
			            <td class="ewTableAltRow"><input id="searchkey" type="text"  name="searchkey"  value="{$searchkey}" /></td>
			          </tr>
			          <tr>
			          	<td class="ewTableHeader">条件:</td>
			            <td class="ewTableAltRow"><mkrtags:radio id="searchtype" name="searchtype"  outtable="Array" value="$searchtype" outfield="AND,OR" outkey="AND,OR" /></td>
			          </tr>
			          <tr>
			            <td colspan="2"  class="ewTableAltRow">
			            <input type="submit"   class="button1" value="搜索" />
			            <input type="button" name="delete" onclick="location.href='__URL__/index/'" class="button1" value="清空" />
			            </td>
			          </tr>
			        </table>
			    </div>
		    </span>
	    
		<span><input type="button"  onclick="location.reload();" class="button1" title="刷新数据" value="刷新数据" /> </span>
    </td>
  </tr>
</table>
<!-- 功能操作区域结束 -->
<!-- Myhtml 系统列表组件开始 -->
<table id="Ad_List" class="list">
  <tr class="row">
    <th width="8">
		<input type="checkbox" id="check" onclick="CheckAll('Ad_List')">
    </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','keywords','<php> echo getsorttype('keywords');</php>','Ad_Grid')"  title="按照广告的关键字排序">广告的关键字
      <php> echo getsorttype('keywords',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','name','<php> echo getsorttype('name');</php>','Ad_Grid')"  title="按照广告名称排序">广告名称
      <php> echo getsorttype('name',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','type','<php> echo getsorttype('type');</php>','Ad_Grid')"  title="按照广告类型排序">广告类型
      <php> echo getsorttype('type',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','isclose','<php> echo getsorttype('isclose');</php>','Ad_Grid')"  title="按照文字广告位是否新开窗口排序">文字广告位是否新开窗口
      <php> echo getsorttype('isclose',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','begintime','<php> echo getsorttype('begintime');</php>','Ad_Grid')"  title="按照广告投放开始日期排序">广告投放开始日期
      <php> echo getsorttype('begintime',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','endtime','<php> echo getsorttype('endtime');</php>','Ad_Grid')"  title="按照广告投放结束日期排序">广告投放结束日期
      <php> echo getsorttype('endtime',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','adcode','<php> echo getsorttype('adcode');</php>','Ad_Grid')"  title="按照广告代码排序">广告代码
      <php> echo getsorttype('adcode',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','posttime','<php> echo getsorttype('posttime');</php>','Ad_Grid')"  title="按照提交日期排序">提交日期
      <php> echo getsorttype('posttime',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','list','<php> echo getsorttype('list');</php>','Ad_Grid')"  title="按照排序值排序">排序值
      <php> echo getsorttype('list',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','uid','<php> echo getsorttype('uid');</php>','Ad_Grid')"  title="按照用户ID排序">用户ID
      <php> echo getsorttype('uid',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','hits','<php> echo getsorttype('hits');</php>','Ad_Grid')"  title="按照点击量排序">点击量
      <php> echo getsorttype('hits',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','money','<php> echo getsorttype('money');</php>','Ad_Grid')"  title="按照广告价格排序">广告价格
      <php> echo getsorttype('money',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','moneycard','<php> echo getsorttype('moneycard');</php>','Ad_Grid')"  title="按照点卡数排序">点卡数
      <php> echo getsorttype('moneycard',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','ifsale','<php> echo getsorttype('ifsale');</php>','Ad_Grid')"  title="按照是否已卖出排序">是否已卖出
      <php> echo getsorttype('ifsale',1);</php>
      </a> </th>
    
    <th> <a class="titleth" href="javascript:AjaxSortBy('Ad','ajaxlist','autoyz','<php> echo getsorttype('autoyz');</php>','Ad_Grid')"  title="按照是否自动通过审核排序">是否自动通过审核
      <php> echo getsorttype('autoyz',1);</php>
      </a> </th>
    
    <th >操作区域</th>
  </tr>
  <php> if(isset($list)): </php>
  <php> $i = 0; </php>
  <php> if( count($list)==0 ) echo "" </php>
  <php> foreach($list as $key=>$list): </php>
  <php> ++$i;</php>
  <php> $mod = (($i % 2 )==0)</php>
  <php> if(($key%2)==0){ $tablesclass="ewTableAltRow";} else { $tablesclass="ewTableRow";} </php>
  <tr class="{$tablesclass}" onmouseover="ew_mouseover(this);" onmouseout="ew_mouseout(this);" onclick="ew_click(this);"  >
    <td><input type="checkbox" name="key"	value="{$list.id}"></td>
    
    <td title="广告的关键字"> <mkrtags:text id="keywords" name="keywords"  value="$list['keywords']"/> </td>
    
    <td title="广告名称"> <mkrtags:text id="name" name="name"  value="$list['name']"/> </td>
    
    <td title="广告类型"> <mkrtags:text id="type" name="type"  value="$list['type']"/> </td>
    
    <td title="文字广告位是否新开窗口"> <mkrtags:text id="isclose" name="isclose"  value="$list['isclose']"/> </td>
    
    <td title="广告投放开始日期"> <mkrtags:text id="begintime" name="begintime"  value="$list['begintime']"/> </td>
    
    <td title="广告投放结束日期"> <mkrtags:text id="endtime" name="endtime"  value="$list['endtime']"/> </td>
    
    <td title="广告代码"> <mkrtags:text id="adcode" name="adcode"  value="$list['adcode']"/> </td>
    
    <td title="提交日期"> <mkrtags:text id="posttime" name="posttime"  value="$list['posttime']"/> </td>
    
    <td title="排序值"> <mkrtags:text id="list" name="list"  value="$list['list']"/> </td>
    
    <td title="用户ID"> <mkrtags:text id="uid" name="uid"  value="$list['uid']"/> </td>
    
    <td title="点击量"> <mkrtags:text id="hits" name="hits"  value="$list['hits']"/> </td>
    
    <td title="广告价格"> <mkrtags:text id="money" name="money"  value="$list['money']"/> </td>
    
    <td title="点卡数"> <mkrtags:text id="moneycard" name="moneycard"  value="$list['moneycard']"/> </td>
    
    <td title="是否已卖出"> <mkrtags:text id="ifsale" name="ifsale"  value="$list['ifsale']"/> </td>
    
    <td title="是否自动通过审核"> <mkrtags:text id="autoyz" name="autoyz"  value="$list['autoyz']"/> </td>
    
    <td>
    	<a href="javascript:edit('{$list.id}')" title="编辑本信息">编辑</a>
     	<a href="javascript:del('{$list.id}')" title="删除本信息">删除</a>
     	<a href="javascript:view('{$list.id}')" title="查看详细信息">详细</a>
    </td>
  </tr>
  <php> endforeach; </php>
  <php> endif; </php>
</table>
<!--Myhtml系统列表组件结束 -->
<!--  分页显示区域 -->
<div class="page">
  <table width="100%">
    <tr>
      <td align="left"></td>
      <td align="right">{$page}</td>
    </tr>
  </table>
</div>
<!--  分页显示区域结束 -->
